home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Hot Mix 17
/
Hot Mix 17.iso
/
HM17_SGI
/
research
/
lib
/
obsolete
/
chi_sqr1.pro
< prev
next >
Wrap
Text File
|
1997-07-08
|
668b
|
36 lines
; $Id: chi_sqr1.pro,v 1.2 1997/01/15 04:02:19 ali Exp $
;
; Copyright (c) 1991-1997, Research Systems Inc. All rights
; reserved. Unauthorized reproduction prohibited.
function chi_sqr1,X,DF
;+
;
; NAME:
; CHI_SQR1
;
; PURPOSE:
; CHI_SQR1 returns the probabilty of observing X or something smaller
; from a chi square distribution with DF degrees of freedom.
;
; CATEGORY:
; Statistics.
;
; CALLING SEQUENCE:
; PROB = CHI_SQR1(X,DF)
;
; INPUTS:
; X: the cut off point
; DF: the degrees of freedom
;-
on_error,2 ; return to caller
if X le 0 THEN return,0 ELSE BEGIN
gres = rsi_gammai(DF/2.0,x/2.0)
if gres NE -1 then return, gres else return,-1
END
end